<template>
  <div>
    <el-input v-model="parent.content"></el-input>
    <div>{{ parent.msgFromChild }}</div>
    <h3>以下为jsx-child组件内容</h3>
    <jsx-child :msgFromParent="parent.content" @childToParent="handleMsgFromChild"></jsx-child>
  </div>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import jsxChild from './jsx-child'

const parent = ref({
  content: '',
  msgFromChild: ''
})
const handleMsgFromChild = (msg: string) => {
  parent.value.msgFromChild = msg
}
</script>
<style lang="scss" scoped></style>
